home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8388 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.6 KB

  1. Path: rcp6.elan.af.mil!rscernix!danpop
  2. From: danpop@mail.cern.ch (Dan Pop)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Schildt <- Advanced Books
  5. Date: 1 Mar 96 13:41:03 GMT
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <danpop.825687663@rscernix>
  8. References: <8BA8405.02C70020DE.uuout@sourcebbs.com> <danpop.824685808@rscernix> <4gg4hn$fa8@hobbes.sco.COM> <danpop.824998634@rscernix> <4gnt96INN205@keats.ugrad.cs.ubc.ca> <4h4q0v$24v@redstone.interpath.net>
  9. NNTP-Posting-Host: ues5.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11.  
  12. softbase@mercury.interpath.net (Scott McMahan - Softbase Systems) writes:
  13.  
  14. >Herb Schildt seems to truly love C and want to help people learn it and
  15. >be an advocate for the language and all, but his enthusiasm doesn't
  16. >quite cover for some of his lapses in correctness. You know which
  17. >road they paved with good intentions. Other than using void main
  18. >and a few other things, he isn't that bad, and his books are
  19. >certainly better than a lot of the crap I've read. Believe me,
  20. >there's a lot worse than Herb out there.
  21.  
  22. Sorry, I can hardly believe that.  Here are two examples (originally
  23. posted by Lawrence Kirby) from page 53 of the _third_ edition of C-TCR:
  24.  
  25.     float f
  26.     printf("%f ", sizeof f);
  27.     printf("%d", sizeof(int));
  28.  
  29. and
  30.  
  31.     void put_rec(int rec[6], FILE *fp)
  32.     {
  33.     int len;
  34.  
  35.     len = fwrite(rec, sizeof rec, 1, fp);
  36.     if(len != 1) printf("write error");
  37.     }
  38.  
  39. Both examples contain errors that could be made only by someone who
  40. hasn't understood the language and are _very_ misleading for the
  41. beginner, especially the second example (any beginner should be able
  42. to spot (at least) one of the two mistakes in the first example).
  43.  
  44. Both mistakes appeared in the second edition of the book, as well, and
  45. they are NOT typos.  Ideally, the author shouldn't be allowed to
  46. publish anything on a topic he is utterly unable to understand.
  47. Unfortunately, the market realities of today are far from ideal :-(
  48.  
  49. >Still and all, he does have the only book I've ever seen with a
  50. >recursive descent parser and a C interpreter in full source code form,
  51. >and since I'm writing a parser myself for another language that starts
  52. >with C and ends with OBOL, I'm kind of happy to have his book to see
  53. >how interpreters are written.
  54.  
  55. Or how interpreters should not be written, if the code is written by
  56. Schildt and not pasted from another source.
  57.  
  58. The point is that interpreters don't belong to a book about programming
  59. in C.  There are plenty of books dedicated to the topic of compilers
  60. and interpreters written by competent people.
  61.  
  62. Dan
  63. --
  64. Dan Pop
  65. CERN, CN Division
  66. Email: danpop@mail.cern.ch 
  67. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  68.